using System.Collections.Generic;

public class LargeBackPack : StoreView
{
    List<Slot> blockslots = new List<Slot>();
    public override void _Ready()
    {
        base._Ready();
        ResetShiftClick();
    }
    public override void Create()
    {
        base.Create();
        int index = 0;
        for (int y = 0; y < 6; y++)
        {
            for (int x = 0; x < 9; x++)
            {
                blockslots.Add(CreateBlockSlot(index, 5 + x * 21, -127 + y * 21));
                index++;
            }
        }
    }
    public override void Updata(Player player)
    {
        base.Updata(player);
        if (block != null && block.blockEntity != null)
        {
            ChestBlockEntity cbe = (ChestBlockEntity)block.blockEntity;
            for (int i = 0; i < blockslots.Count; i++)
            {
                blockslots[i].SetItemStack(cbe.store.GetItemStack(blockslots[i].index));
            }
        }

    }
}
